package com.dhnsoft.map;

import com.dhnsoft.game.Bullet;
import com.dhnsoft.util.BulletsPool;
import com.dhnsoft.util.MyUtil;

import java.awt.*;
import java.util.List;

/**
 * @Description
 * @ClassName MapTile
 * @Author dhn
 * @date 2020.11.20 16:27
 */
//地图元素块
public class MapBuff {

    public static final int BUFF_ATK = 1;
    public static final int BUFF_SPPED = 2;
    public static int tileW = 40;
    public static int radius = tileW>>1;
    private static Image[] buffImg;

    static {
        buffImg = new Image[4];
        buffImg[BUFF_ATK]=MyUtil.createImage("images/atk.gif");
        buffImg[BUFF_SPPED]=MyUtil.createImage("images/speed.gif");

    }
    //图片资源的左上角
    private int x,y;
    private boolean atkVisible = true;
    private boolean speedVisible = true;
    public MapBuff() {
        x=440;
        y=280;
    }

    public void drawATK(Graphics g){
        if(!atkVisible){
            return;
        }
        //System.out.println(visible);
        g.drawImage(buffImg[BUFF_ATK],x,y,null);
    }
    public void drawSpeed(Graphics g){
        if(!speedVisible){
            return;
        }
        //System.out.println(visible);
        g.drawImage(buffImg[BUFF_SPPED],720,580,null);
    }



    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public boolean isAtkVisible() {
        return atkVisible;
    }

    public void setAtkVisible(boolean atkVisible) {
        this.atkVisible = atkVisible;
    }

    public boolean isSpeedVisible() {
        return speedVisible;
    }

    public void setSpeedVisible(boolean speedVisible) {
        this.speedVisible = speedVisible;
    }
}


